#pragma once

const int defaultSize = 128;

template<class Type>
class MyArray
{
public:
	MyArray(int size=defaultSize);
	MyArray(const MyArray<Type>& x);
	~MyArray();
	int size() const;
	Array<Type>& operator= (const Array<Type>& rhs);
	Type& operator[] (int i);
	void reSize(int size);

private:
	Type *elements;
	int arraySize;
};


template<class Type>
MyArray<Type>::MyArray(int size)
{
	this->arraySize = size;
	this->elements = new Type[size];
}

template<class Type>
MyArray<Type>::MyArray(const MyArray<Type>& x)
{
	this->arraySize = x.size();
}

template<class Type>
MyArray<Type>::~MyArray()
{
	delete[] this->elements;
}

template<class Type>
int MyArray<Type>::size() const
{
	return this->arraySize;
}
